from ultralytics import YOLO

# Load a model
model = YOLO(model="yolo11l.pt")
# model = YOLO(model="runs/detect/train21/weights/last.pt")
# crowdhuman.yaml
# mydatavisdrone.yaml
if __name__ == '__main__':
    # Train the model
    train_results = model.train(
        # data="crowdhuman.yaml",  # path to dataset YAML
        data="mydatavisdrone.yaml",  # path to dataset YAML
        # data="WEB.yaml",  # path to dataset YAML
        epochs=200,  # number of training epochs
        # imgsz=640,  # training image size
        device=0,  # device to run on, i.e. device=0 or device=0,1,2,3 or device=cpu
    )